﻿using Microsoft.EntityFrameworkCore;
using System.Threading;
using System.Threading.Tasks;
using ZFY.UnitOfWork;

namespace ZFY.EntityFrameworkCore
{
    public class EFDbContextApi : IDbContextApi
    {
        public DbContext DbContext { get; }

        public EFDbContextApi(DbContext dbContext)
        {
            DbContext = dbContext;
        }

       

        public async Task SaveChangesAsync(CancellationToken cancellationToken)
        {
            await DbContext.SaveChangesAsync();
        }
    }
}
